unit U_AskForDate;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, sLabel, Mask, sMaskEdit, sCustomComboEdit, sTooledit,
  sButton, ExtCtrls, sPanel;

type
  TfrmAskForDate = class(TForm)
    sPanel1: TsPanel;
    sPanel2: TsPanel;
    sButton1: TsButton;
    sButton2: TsButton;
    sDateEdit1: TsDateEdit;
    sLabel1: TsLabel;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmAskForDate: TfrmAskForDate;

function AskForDate(AOwner:TComponent; var RepDate:TDate):boolean;

implementation

{$R *.dfm}

function AskForDate(AOwner:TComponent; var RepDate:TDate):boolean;
begin
  result := false;
  frmAskForDate := TfrmAskForDate.Create(Aowner);
  frmAskForDate.sDateEdit1.Date := Date;
  frmAskForDate.ShowModal;
  if frmAskForDate.ModalResult = mrOk then
  begin
    RepDate:= frmAskForDate.sDateEdit1.Date;
    result := true;
  end;
  frmAskForDate.Free;
end;

end.
